perm filename POX.REM[UP,DOC]10 blob sn#230088 filedate 1976-08-09 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00005 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002		Prototype Overlay Xerographics
C00004 00003		POX is a program for making documents  that take advantage of
C00009 00004	Q-REGISTERS
C00014 00005			APPENDIX -- SUMMARY OF ALL POX COMMANDS
C00018 ENDMK
C⊗;
	Prototype Overlay Xerographics
	By Robert Elton Maas, revised by Ralph E. Gorin

Note: This file is a VERY OLD  version  of  the  POX  writeup,
edited  to  be  readable on remote teletypes.  All local users
would be better off with an  XGP  version  of  a  more  recent
edition of the writeup.  Type HELP POX for pointers to various
files that are relevant  if  you  want  to  make  a  brand-new
hardcopy (complete or partial) for yourself.

Now  that  the  new  writeup is available, several people have
hardcopies around that you may prefer to consult,  considering
it  takes a long time to compile and XSPOOL a new writeup, and
in the middle of the day it even takes a while  to  XSPOOL  an
already-compiled writeup.


	POX is a program for making documents  that take advantage of
the special  features available on the  Xerox Graphics Printer (XGP).
The special features that POX provides are mainly font  switching and
text justification.   (There  are some  other features,  but a novice
user need not be concerned with them at present.)

	POX takes a file as input and produces an output file that is
suitable  for spooling with  the XGP  spooler (XSPOOL command).   The
input file contains instructions to POX and the text of the document.
POX takes character sequences as  commands.  Each command sequence is
preceded  by a  character, called  the Escape  Character.   The first
character in the file (ignoring TV directories and  SOS line numbers)
is  taken by POX  as the escape  character.   Thus, the user  gets to
specify the escape character.  The escape character can be arbitrary,
but reason  dictates that it  should be  some character that  appears
infrequently  (or not at  all) in the  text of the  document.  Common
choices for the escape character is \ or $.  In the remainder of this
document, the character \ represents the current Escape Character. 

	To run POX, use the system command R POX.  POX wants to see a
command  of the  form: <OUTPUT  FILE>←<INPUT FILE>.   If  the <OUTPUT
FILE> term is omitted then the output file will have the same name as
the input file, and ".XGP" extension.  If the extension is omitted on
the output file, ".XGP" will be used. 

	If all is well with the input file, POX will run and  produce
an output file suitable for XSPOOLing.  POX will load the appropriate
XSPOOL command  into your line editor, so all you  have to do is type
return to spool the file. 

	(POX may be used as post-processor for some other program. In
this case, POX can accept certain XGP escape sequences at some places
in the file.)

	Below is a list of commands, where
<N>    represents a character in the range of 0,1,2,...,9,A,B,...,F
       that specifies the font ID number,
<KH>   represents any character, and
<FONT> represents a font filename (defaults are .FNT[XGP,SYS])


\|<KH>		(changes the escape character to <KH>)
\M<N><FONT>;	(causes the font to be compiled, and selects it now)
\F<N>		(selects a font which has already been compiled)
\f<N>		(selects a font for just one character,
		then back to old font)
\S		(generates a sample of the currently-selected font,
		see bulletin board)
\;		(everything until next crlf is a comment,
		typed on tty but not included in output file,
		the crlf is flushed totally.  Mostly, this
		command is to break up a very long input line
		without causing <crlf> to appear in the output)
\,		(same as \; except it flushes through next
		page mark or form-feed.  Not valid in paragraph mode.)
\\		(quotes the escape character)
\J		(begins full-justify submode, use \. to exit
		this mode. ONLY the following \-style commands are
		available:  \\ \F<N>.
\R		(begins align-text-against-right-margin-mode,
		until the next <crlf>, \; or \.
		Similar restrictyions as \J mode)
\C		(begins center-the-line mode, similar to \R)

Q-REGISTERS
	There are  128 registers which  can hold any  36-bit integer,
usually the horizonal coordinate of some column on the page. The idea
is   to   allow    specification   of    multi-column   tables    and
superscripts-above-subscripts in an easy  and flexable way, including
automatic  allocation of  such things  as "1/5  of a page"  by simple
division.  Each  register is specified  by an ASCII character,  hence
some registers are actually  inaccessible, but who cares?  Register 0
(null character, inaccessible  usually) is  called the  "accumulator"
and  is the  intermediate  storage for  all  sequences of  arithmetic
calculation.   Register '56 (the  period character) always represents
the current column location. Every time a character is  written, this
q-register  is updated  to  account  for the  space  used  up by  the
character,  and if  you  try to  write in  this q-register,  a column
select will be generated in your output file as  well as updating the
q-register  to reflect the  column select.  Q-reg's L  and R  are the
LEFT-MARGIN and the RIGHT-MARGIN. The commands are shown below, where
the  letter Q  represents any  character,  and is  used  to select  a
q-register -- however, if Q is the right-apostrophe "'", then instead
of reading from a q-register, the octal digits from here to  the next
semicolon are assembled  into an unsigned constant  and that constant
acts  as an immediate operand.  Also,  an equal-sign causes a decimal
argument to be scanned up  to the next semicolon. Also,  lower-case w
followed by character gives the width of that character:

\←Q	(Load ac from q-reg)
\+Q	(ac plus q-reg, result in ac)
\-Q	(ac minus q-reg, result in ac)
\¬Q	(q-reg minus ac, result in ac)
\*Q	(ac times q-reg, result in ac)
\/Q	(ac divided by q-reg, result (quotient) in ac)
\\Q	(q-reg divided by ac, result (quotient) in ac)
\~Q	(maximum of ac and q-reg, result in ac)
\_Q	(minimum of ac and q-reg, result in ac)
\→Q	(store contents of ac into q-reg, immediate operand not allowed)
\↑Q	(move text up q/200 inch)
\↓Q	(move text down q/200 inch)
\∩	(up to default superscript location)
\∪	(down to default subscript location)
\⊗	(back to normal baseline, don't forget this!)
\ULABR	(underline from location L to location R,
	on relative scan line A (A positive moves the underline down),
	with line thickness B.  Each of L,A,B,R may be a q-reg or an
	immediate operand)
\j \r or \c
        (same as \J \R or \C except they set up temporary margins
         from q-registers l and r) 

		APPENDIX -- SUMMARY OF ALL POX COMMANDS
IN THE APPROXIMATE CHRONOLOGICAL ORDER IN WHICH THEY WERE IMPLEMENTED
	[Original commands by R.E.Maas 1973]
	;0		ALL OTHERS, ILLEGAL
	;1  |		SET NEW ESCAPE
	;2  M		MAKE A NEW FONT
	;3  ;		IGNORE THRU LF ETC.
	;4  ,		IGNORE THRU FF
	;5  F		FONT SELECT
	;6  f		FONT SELECT FOR ONE CHARACTER
	;7  S		SAMPLE
	;10 J		JUSTIFY
	;11 j		JUSTIFY
	;12 C		CENTER
	;13 c		CENTER
	;14 R		RIGHTIFY
	;15 r		RIGHTIFY
	;16 ←+-*/\¬∧∨%L~_ Q-REGISTER ARITHMETIC
	;17 →		Q REGISTER DEPOSIT
*	;62 ↑↓		Q-REGISTER SUB/SUP-SCRIPT [GENERATES ESCAPE SEQ. VIA XCT W]
	;20 ∩∪⊗		MOVE BASELINE.

	[Added by R.E.Gorin 1973-74]
	;21 U		UNDERSCORE
	;22 P		PUSH
	;23 p		POP
	;24 '		QUOTE WITH RUBOUT <<NOT RECCOMMENDED>>
	;25 λ		SET SPECIAL LINE SPACE FROM AC0
	;26 V		VECTOR
	;27 Y		Set Y position

	[Added by R.E.Maas 1974-75]
	;30 ∞		Define macro
	;31 !		Call macro
	;32 ?		If QREGAC>0 then call macro else scan but null semantics
	;33 @		Require source file, then return
	;34 α		Jump to file, don't return
*	;26 v		pretty vector
	;35 Q		PUSH WITH ARG
	;36 q		POP WITH ARG
	;37 o		DEFINE ATOMIC TEXT OVERLAY
	;40 O		OUTPUT OVERLAY
	;41 123456	LOAD QREGAC WITH PARAMETER FROM OVERLAY <<5,6 NOT WORKING>>
	;42 `		[TEMPORARY] SET UP VERSION FLAGS <<NOT RECCOMMENDED>>
	;43 &		COMBINE SEVERAL OVERLAYS INTO ONE, WITH OFFSETS EACH
	;44 ∂		RENAME OVERLAY IN COMPLICATED WAY
	;45 :		CLOBBER SELECTED SIZE PARAMETER OF OVERLAY
	;46 ε		SET MINIMUM BASELINE SPACING, USED IN CONJUNCTION WITH λ
	;47 <SP><TB>	IGNORE SPACES UNTIL ; SEEN (FOR PRETTY SOURCE FILES)
	;50 <VT>N	BREAK TO NEXT LINE HERE WITHOUT AFFECTING SYNTAX
	;51 u		CALLI UUO
	;52 "		QUOTE THE NEXT CHARACTER (WITHOUT RUBOUT UNLESS NEEDED)
	;53 n		NO PAGE CHANGE NEXT TIME <<NOT SUPPORTED>>
	;54 A		CVT QREG TO CHARACTER (WITHOUT RUBOUT UNLESS NEEDED) AND OUTPUT
	;55 ⊂		TURN ON DEBUG FLAGS -- VLEVE←VLEVEL∨ARG
	;56 ⊃		TURN OFF DEBUG FLAGS -- VLEVEL←VLEVEL∧(¬ARG)
	;57 {		START UNDERLINE [WRITES ESCAPE SEQUENCE VIA XCT W]
	;60 }		STOP UNDERLINE [DITTO]
	;61 D		CONVERT DECIMAL TO STRING MACRO AND SPLICE NOW [INPDL]
*	;40 W		SAME AS O BUT FORCES ON SAME PAGE, DOES NOT AFFECT PAGE PRINTER
	;63 β		DO LOOKUP ON FILE, WARN IF MISSING, BUT DON'T READ IT
	;64 ∀		SCAN OF LIBRARY OF MACRO DEFINITIONS

	[Not yet implemented -- 1975.Oct]
	;N1 X		(RESERVED FOR EXTENDED-SCANNER TO BE IMPLEMENTED SOMEDAY)
	;N2 ππ		(RESERVED FOR ILLEGAL COMMAND TO ENTER DEBUG PACKAGE)